varying vec3 texCoords;
uniform sampler2D tex;
varying vec3 normal, eyeVec, light;

void main()
{
    vec2 v = vec2(texCoords.x, texCoords.y);
    vec4 color = texture2D(tex,v);

    if (color.x > .8 && color.y > .8 && color.z > .8){
        color.a = 0.0;
    }
    //color *= texCoords.z;

    //if(color.a >.01)
    //    color.w = 1.0;


    vec3 N = normalize(normal);
    vec3 L = normalize(light);
    float lambert = dot(N,L);
    if(lambert < 0) lambert = 0;
    vec4 final  = (color * lambert ) + color * (.5);
    //vec4 final = color;
//color*= lambert;

    if(final.a >.01)
        final.w = 1.0;

    gl_FragColor = final;
}
